//
//  NSArrayDataExtend.m
//  CedarFinancePH
//
//  Created by lshenrong on 2018/4/28.
//  Copyright © 2018年 cedarhd. All rights reserved.
//

#import "TableViewDataExtend.h"

@interface TableViewDataExtend()




@end

@implementation TableViewDataExtend


+ (instancetype)dataWithPageNum:(NSInteger)pageNum pageSize:(NSInteger)pageSize{
    TableViewDataExtend *array  = [[TableViewDataExtend alloc]init];
    array.pageNum = pageNum;
    array.pageSize = pageSize;
    return array;
}



- (void)addNewArrayData:(NSArray *)data{
    if ([data count]>0) {
        [self.listData addObjectsFromArray:data];
    }
}

- (void)resetAddNewArrayData:(NSArray *)data{
    [self removeAllListData];
    if ([data count]>0) {
        [self.listData addObjectsFromArray:data];
    }
}

- (void)removeAllListData{
    if ([self.listData count]>0) {
        [self.listData removeAllObjects];
    }
}


- (NSMutableArray *)listData{
    if (!_listData) {
        _listData = [NSMutableArray array];
    }
    return _listData;
}


@end
